package com.cqrcb.cloud.fallback;///*


 import com.cqrcb.cloud.entity.api.req.Q;
 import com.cqrcb.cloud.entity.api.res.R;
 import com.cqrcb.cloud.entity.quota.MultiQuotaCtrlMarketMain;
 import com.cqrcb.cloud.entity.quota.io.MultiQuotaCtrlMarketMainIO;
 import com.cqrcb.cloud.service.quota.MultiQuotaCtrlMarketMainService;
 import lombok.extern.slf4j.Slf4j;

/**
 * @author lengleng
 * <p>
 * sentinel 降级处理
 */
 @Slf4j
public class MultiQuotaCtrlMarketMainServiceFallback implements MultiQuotaCtrlMarketMainService {

	private Throwable throwable;

	MultiQuotaCtrlMarketMainServiceFallback(Throwable throwable) {
		this.throwable = throwable;
	}

	/**
	 * 调用服务提供方的输出接口.
	 * @return String
	 */
//	@Override
//	public String echo(String str) {
//		return "consumer-fallback-default-str" + throwable.getMessage();
//	}

    @Override
    public boolean saveFinancialProductQuota(MultiQuotaCtrlMarketMain record) {
        return false;
    }

    @Override
    public int updateByPrimaryKeySelective(MultiQuotaCtrlMarketMain record) {
        return 0;
    }

    @Override
    public R deductionFinancialProductQuota(Q<MultiQuotaCtrlMarketMainIO> q) {
        log.error("扣减额度时失败，原因->{}",throwable);
        return R.fail("报错了");
    }

    @Override
    public MultiQuotaCtrlMarketMain deductionQuota(MultiQuotaCtrlMarketMainIO record) {
        return null;
    }

    @Override
    public MultiQuotaCtrlMarketMain saveMultiQuotaCtrlMarketMainToRedis(MultiQuotaCtrlMarketMain multiQuotaCtrlMarketMain) {
        return null;
    }

    public MultiQuotaCtrlMarketMain getMultiQuotaCtrlMarketMainForRedis(MultiQuotaCtrlMarketMainIO record) {
        return null;
    }

    @Override
    public MultiQuotaCtrlMarketMain getMultiQuotaCtrlMarketMainForDB(MultiQuotaCtrlMarketMainIO record) {
        return null;
    }
}
